
/////////////////////////////////////
*-- Robustness Agriculture
/////////////////////////////////////



reg primary70_individual bartik_standardized i.laani50 , cl(muni39_g)
estadd local sample "All"

estadd local mfe "None"
estadd local rfe "\checkmark"
estadd local indi ""
sum primary70_individual 
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p1


reghdfe primary70_individual bartik_standardized $municontrols , a(fem byear laani50) cl(muni39_g)

estadd local sample "All"
estadd local mfe "Baseline"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum primary70_individual 
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p2


reghdfe primary70_individual bartik_standardized $lasso , a(fem byear laani50) cl(muni39_g)
estadd local sample "All"

estadd local mfe "Lasso"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum primary70_individual 
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p3


reghdfe primary70_individual bartik_standardized  i.manu_quartile i.agri_quartile  town city ,  a(fem byear laani50) cl(muni39_g)
estadd local sample "All"

estadd local mfe "Baseline groups"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum primary70_individual 
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p5


reghdfe primary70_individual bartik_high $municontrols , a(fem byear laani50) cl(muni39_g)
estadd local sample "All"

estadd local mfe "Baseline"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum primary70_individual 
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p6

reghdfe primary70_individual bartikq2 bartikq3 bartikq4 $municontrols , a(fem byear laani50) cl(muni39_g)
estadd local sample "All"

estadd local mfe "Baseline"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum primary70_individual 
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p7


reg primary70_individual bartik_standardized i.laani50 if primary39==1, cl(muni39_g)
estadd local sample "Agriculture 1939"

estadd local mfe "None"
estadd local rfe "\checkmark"
estadd local indi ""
sum primary70_individual if primary39==1
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p8


reghdfe primary70_individual bartik_standardized $municontrols if primary39==1, a(fem byear laani50) cl(muni39_g)

estadd local sample "Agriculture 1939"
estadd local mfe "Baseline"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum primary70_individual if primary39==1
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p9


reghdfe primary70_individual bartik_standardized $lasso if primary39==1, a(fem byear laani50) cl(muni39_g)
estadd local sample "Agriculture 1939"

estadd local mfe "Lasso"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum primary70_individual if primary39==1
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p10



reghdfe primary70_individual bartik_standardized  i.manu_quartile i.agri_quartile  town city if primary39==1,  a(fem byear laani50) cl(muni39_g)
estadd local sample "Agriculture 1939"
estadd local mfe "Baseline groups"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum primary70_individual if primary39==1
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p12


reghdfe primary70_individual bartik_high $municontrols if primary39==1, a(fem byear laani50) cl(muni39_g)
estadd local sample "Agriculture 1939"
estadd local mfe "Baseline"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum primary70_individual if primary39==1
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p13

reghdfe primary70_individual bartikq2 bartikq3 bartikq4 $municontrols if primary39==1, a(fem byear laani50) cl(muni39_g)
estadd local sample "Agriculture 1939"
estadd local mfe "Baseline"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum primary70_individual if primary39==1
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p14

label var bartik_high "Bartik high"
label var bartikq2 "Bartik q2"
label var bartikq3 "Bartik q3"
label var bartikq4 "Bartik q4"



esttab p1 p2 p3  p5 p6 p7 p8 p9 p10 p12 p13 p14 ///
using "$temp\tables\agri_1970_robustness.tex", ///
mgroups("Agriculture in 1970", pattern(1 0 0 0 0 0 0 0 0 0 0 0 0 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) ///
span erepeat(\cmidrule(lr){@span}) ) ///
replace keep(bartik_standardized bartik_high bartikq2 bartikq3 bartikq4) nonotes ///
b(%9.3f) se(%9.3f)  stats(N sample  ymean mfe rfe indi , fmt(0 3) layout(@ @ @) ///
labels("N" "Sample"  "Y mean" "Municipal controls" "Region Fes" "Individual controls")) label star(* .1 ** .05 *** .01) nodepvars nomtitle



est clear

/////////////////////////////////////
*-- Robustness Manufactruing
/////////////////////////////////////



reg manufacturing70_individual bartik_standardized i.laani50 , cl(muni39_g)
estadd local sample "All"

estadd local mfe "None"
estadd local rfe "\checkmark"
estadd local indi ""
sum manufacturing70_individual 
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p1


reghdfe manufacturing70_individual bartik_standardized $municontrols , a(fem byear laani50) cl(muni39_g)

estadd local sample "All"
estadd local mfe "Baseline"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum manufacturing70_individual 
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p2


reghdfe manufacturing70_individual bartik_standardized $lasso , a(fem byear laani50) cl(muni39_g)
estadd local sample "All"

estadd local mfe "Lasso"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum manufacturing70_individual 
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p3


reghdfe manufacturing70_individual bartik_standardized  i.manu_quartile i.agri_quartile  town city ,  a(fem byear laani50) cl(muni39_g)
estadd local sample "All"

estadd local mfe "Baseline groups"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum manufacturing70_individual 
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p5


reghdfe manufacturing70_individual bartik_high $municontrols , a(fem byear laani50) cl(muni39_g)
estadd local sample "All"

estadd local mfe "Baseline"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum manufacturing70_individual 
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p6

reghdfe manufacturing70_individual bartikq2 bartikq3 bartikq4 $municontrols , a(fem byear laani50) cl(muni39_g)
estadd local sample "All"

estadd local mfe "Baseline"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum manufacturing70_individual 
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p7


reg manufacturing70_individual bartik_standardized i.laani50 if primary39==1, cl(muni39_g)
estadd local sample "Agriculture 1939"

estadd local mfe "None"
estadd local rfe "\checkmark"
estadd local indi ""
sum manufacturing70_individual if primary39==1
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p8


reghdfe manufacturing70_individual bartik_standardized $municontrols if primary39==1, a(fem byear laani50) cl(muni39_g)

estadd local sample "Agriculture 1939"
estadd local mfe "Baseline"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum manufacturing70_individual if primary39==1
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p9


reghdfe manufacturing70_individual bartik_standardized $lasso if primary39==1, a(fem byear laani50) cl(muni39_g)
estadd local sample "Agriculture 1939"

estadd local mfe "Lasso"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum manufacturing70_individual if primary39==1
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p10


reghdfe manufacturing70_individual bartik_standardized  i.manu_quartile i.agri_quartile  town city if primary39==1,  a(fem byear laani50) cl(muni39_g)
estadd local sample "Agriculture 1939"

estadd local mfe "Baseline groups"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum manufacturing70_individual if primary39==1
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p12


reghdfe manufacturing70_individual bartik_high $municontrols if primary39==1, a(fem byear laani50) cl(muni39_g)
estadd local sample "Agriculture 1939"
estadd local mfe "Baseline"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum manufacturing70_individual if primary39==1
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p13

reghdfe manufacturing70_individual bartikq2 bartikq3 bartikq4 $municontrols if primary39==1, a(fem byear laani50) cl(muni39_g)
estadd local sample "Agriculture 1939"
estadd local mfe "Baseline"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum manufacturing70_individual if primary39==1
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p14

label var bartik_high "Bartik high"
label var bartikq2 "Bartik q2"
label var bartikq3 "Bartik q3"
label var bartikq4 "Bartik q4"



esttab p1 p2 p3 p5 p6 p7 p8 p9 p10 p12 p13 p14 ///
using "$temp\tables\manu_1970_robustness.tex", ///
mgroups("Manufacturing in 1970", pattern(1 0 0 0 0 0 0 0 0 0 0 0 0 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) ///
span erepeat(\cmidrule(lr){@span}) ) ///
replace keep(bartik_standardized bartik_high bartikq2 bartikq3 bartikq4) nonotes ///
b(%9.3f) se(%9.3f)  stats(N sample  ymean mfe rfe indi , fmt(0 3) layout(@ @ @) ///
labels("N" "Sample"  "Y mean" "Municipal controls" "Region Fes" "Individual controls")) label star(* .1 ** .05 *** .01) nodepvars nomtitle



est clear



/////////////////////////////////////
*-- Robustness Income
/////////////////////////////////////



reg ln_svatv bartik_standardized i.laani50 , cl(muni39_g)
estadd local sample "All"

estadd local mfe "None"
estadd local rfe "\checkmark"
estadd local indi ""
sum ln_svatv 
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p1


reghdfe ln_svatv bartik_standardized $municontrols , a(fem byear laani50) cl(muni39_g)

estadd local sample "All"
estadd local mfe "Baseline"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum ln_svatv 
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p2


reghdfe ln_svatv bartik_standardized $lasso , a(fem byear laani50) cl(muni39_g)
estadd local sample "All"

estadd local mfe "Lasso"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum ln_svatv 
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p3


reghdfe ln_svatv bartik_standardized  i.manu_quartile i.agri_quartile  town city ,  a(fem byear laani50) cl(muni39_g)
estadd local sample "All"

estadd local mfe "Baseline groups"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum ln_svatv 
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p5


reghdfe ln_svatv bartik_high $municontrols , a(fem byear laani50) cl(muni39_g)
estadd local sample "All"

estadd local mfe "Baseline"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum ln_svatv 
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p6

reghdfe ln_svatv bartikq2 bartikq3 bartikq4 $municontrols , a(fem byear laani50) cl(muni39_g)
estadd local sample "All"

estadd local mfe "Baseline"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum ln_svatv 
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p7


reg ln_svatv bartik_standardized i.laani50 if primary39==1, cl(muni39_g)
estadd local sample "Agriculture 1939"

estadd local mfe "None"
estadd local rfe "\checkmark"
estadd local indi ""
sum ln_svatv if primary39==1
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p8


reghdfe ln_svatv bartik_standardized $municontrols if primary39==1, a(fem byear laani50) cl(muni39_g)

estadd local sample "Agriculture 1939"
estadd local mfe "Baseline"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum ln_svatv if primary39==1
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p9


reghdfe ln_svatv bartik_standardized $lasso if primary39==1, a(fem byear laani50) cl(muni39_g)
estadd local sample "Agriculture 1939"

estadd local mfe "Lasso"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum ln_svatv if primary39==1
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p10


reghdfe ln_svatv bartik_standardized  i.manu_quartile i.agri_quartile  town city if primary39==1,  a(fem byear laani50) cl(muni39_g)
estadd local sample "Agriculture 1939"

estadd local mfe "Baseline groups"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum ln_svatv if primary39==1
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p12


reghdfe ln_svatv bartik_high $municontrols if primary39==1, a(fem byear laani50) cl(muni39_g)
estadd local sample "Agriculture 1939"

estadd local mfe "Baseline"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum ln_svatv if primary39==1
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p13

reghdfe ln_svatv bartikq2 bartikq3 bartikq4 $municontrols if primary39==1, a(fem byear laani50) cl(muni39_g)
estadd local sample "Agriculture 1939"

estadd local mfe "Baseline"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum ln_svatv if primary39==1
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p14

label var bartik_high "Bartik high"
label var bartikq2 "Bartik q2"
label var bartikq3 "Bartik q3"
label var bartikq4 "Bartik q4"



esttab p1 p2 p3 p5 p6 p7 p8 p9 p10 p12 p13 p14 ///
using "$temp\tables\logincome_1970_robustness.tex", ///
mgroups("Log Income", pattern(1 0 0 0 0 0 0 0 0 0 0 0 0 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) ///
span erepeat(\cmidrule(lr){@span}) ) ///
replace keep(bartik_standardized bartik_high bartikq2 bartikq3 bartikq4) nonotes ///
b(%9.3f) se(%9.3f)  stats(N sample  ymean mfe rfe indi , fmt(0 3) layout(@ @ @) ///
labels("N" "Sample"  "Y mean" "Municipal controls" "Region Fes" "Individual controls")) label star(* .1 ** .05 *** .01) nodepvars nomtitle

est clear


/////////////////////////////////////
*-- Robustness Income rank
/////////////////////////////////////



reg income_rank bartik_standardized i.laani50 , cl(muni39_g)
estadd local sample "All"

estadd local mfe "None"
estadd local rfe "\checkmark"
estadd local indi ""
sum income_rank 
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p1


reghdfe income_rank bartik_standardized $municontrols , a(fem byear laani50) cl(muni39_g)

estadd local sample "All"
estadd local mfe "Baseline"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum income_rank 
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p2


reghdfe income_rank bartik_standardized $lasso , a(fem byear laani50) cl(muni39_g)
estadd local sample "All"

estadd local mfe "Lasso"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum income_rank 
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p3


reghdfe income_rank bartik_standardized  i.manu_quartile i.agri_quartile  town city ,  a(fem byear laani50) cl(muni39_g)
estadd local sample "All"

estadd local mfe "Baseline groups"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum income_rank 
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p5


reghdfe income_rank bartik_high $municontrols , a(fem byear laani50) cl(muni39_g)
estadd local sample "All"

estadd local mfe "Baseline"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum income_rank 
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p6

reghdfe income_rank bartikq2 bartikq3 bartikq4 $municontrols , a(fem byear laani50) cl(muni39_g)
estadd local sample "All"

estadd local mfe "Baseline"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum income_rank 
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p7


reg income_rank bartik_standardized i.laani50 if primary39==1, cl(muni39_g)
estadd local sample "Agriculture 1939"

estadd local mfe "None"
estadd local rfe "\checkmark"
estadd local indi ""
sum income_rank if primary39==1
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p8


reghdfe income_rank bartik_standardized $municontrols if primary39==1, a(fem byear laani50) cl(muni39_g)

estadd local sample "Agriculture 1939"
estadd local mfe "Baseline"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum income_rank if primary39==1
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p9


reghdfe income_rank bartik_standardized $lasso if primary39==1, a(fem byear laani50) cl(muni39_g)
estadd local sample "Agriculture 1939"

estadd local mfe "Lasso"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum income_rank if primary39==1
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p10



reghdfe income_rank bartik_standardized  i.manu_quartile i.agri_quartile  town city if primary39==1,  a(fem byear laani50) cl(muni39_g)
estadd local sample "Agriculture 1939"

estadd local mfe "Baseline groups"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum income_rank if primary39==1
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p12


reghdfe income_rank bartik_high $municontrols if primary39==1, a(fem byear laani50) cl(muni39_g)
estadd local sample "Agriculture 1939"

estadd local mfe "Baseline"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum income_rank if primary39==1
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p13

reghdfe income_rank bartikq2 bartikq3 bartikq4 $municontrols if primary39==1, a(fem byear laani50) cl(muni39_g)
estadd local sample "Agriculture 1939"

estadd local mfe "Baseline"
estadd local rfe "\checkmark"
estadd local indi "\checkmark"
sum income_rank if primary39==1
estadd scalar ymean=r(mean)
estadd scalar ysd=r(sd)
estimates store p14

label var bartik_high "Bartik high"
label var bartikq2 "Bartik q2"
label var bartikq3 "Bartik q3"
label var bartikq4 "Bartik q4"



esttab p1 p2 p3 p5 p6 p7 p8 p9 p10 p12 p13 p14 ///
using "$temp\tables\incomerank_1970_robustness.tex", ///
mgroups("Income Rank", pattern(1 0 0 0 0 0 0 0 0 0 0 0 0 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) ///
span erepeat(\cmidrule(lr){@span}) ) ///
replace keep(bartik_standardized bartik_high bartikq2 bartikq3 bartikq4) nonotes ///
b(%9.3f) se(%9.3f)  stats(N sample  ymean mfe rfe indi , fmt(0 3) layout(@ @ @) ///
labels("N" "Sample"  "Y mean" "Municipal controls" "Region Fes" "Individual controls")) label star(* .1 ** .05 *** .01) nodepvars nomtitle


